<%= content_for :css do %>
  <style>
    #content {
      width: 1000px;
      margin: 0 auto;
    }
    #content .content-list {
      position: relative;
    }
  </style>
<% end %>


<div id="content">
  
  <div class="content-list">
  
    <table class="table">
      <tr>
        <th>活动名称</th>
        <th>主力社团</th>
        <th>活动时间</th>
        <th>发布时间</th>
        <th>是否申请</th>
      </tr>
 
      <div id="content">
        
        <div class="content-list">
          <ul>
            <% @activities.each do |e| %>
            <tr>
              
              <td style="width: 300px;">
                <a href="/index/activity/<%= e.id %>" class="list_title">
                  <%= e.name%> 
                </a>
              </td>
          
              <td style="width: 300px;"><%= (society2=get_data_by_pid('id',e.society_id,StuSociety)).blank? ? '' : society2.first.name %></td> 
              <td style="width: 300px;"><%= e.apply_start_time.to_s[0..15] %></td>
              <td style="width: 300px;"><%= e.create_time.to_s[0..10] %></td>
              <td style="width: 300px;"><%= button_to "申请加入", '/index/activity/joinActivity', method: :put %></td>
              
            </tr>
            <% end %>

     
          </ul>
        </div>
      </div>

    </table>
    
    
    
    
    
    
    <div class="digg_pagination">
      <%= will_paginate @activities, :container => false %>
    </div>
  </div>
</div>